Where does `signup`, `login`, `register` methods come from

Posted by samuil on Stack Overflow See other posts from Stack Overflow or by samuil
Published on 2010-03-18T12:51:59Z Indexed on 2010/03/18 13:01 UTC
Read the original article Hit count: 365

Filed under:
|

In this piece of code:

ActionController::Routing::Routes.draw do |map|
  map.resources :line_items
  map.resources :orders
  map.resources :products
  map.resources :categories

  map.logout '/logout', :controller => 'sessions', :action => 'destroy'
  map.login '/login', :controller => 'sessions', :action => 'new'
  map.register '/register', :controller => 'user', :action => 'create'
  map.signup '/signup', :controller => 'user', :action => 'new'
  map.connect '/add-to-cart', :controller => 'line_items', :action => 'new'
end

map object has methods connect and resources called, which are described in ActionController documentation. Where are the other ones defined/described? They were generated by RESTful authentication plugin.

How should I map /add-to-cart to it's action/controller, to have automatically add_to_cart_path method generated?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about routing